package com.huawei.hmf.orb.aidl.communicate;

import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;

public class DataBuffer implements Parcelable {
    public static final Creator<DataBuffer> CREATOR = new Creator<DataBuffer>() {
        public /* synthetic */ Object createFromParcel(Parcel parcel) {
            return ˊ(parcel);
        }

        public /* synthetic */ Object[] newArray(int i) {
            return ˊ(i);
        }

        public DataBuffer ˊ(Parcel parcel) {
            return new DataBuffer(parcel);
        }

        public DataBuffer[] ˊ(int i) {
            return new DataBuffer[i];
        }
    };
    private Bundle ˊ;
    public String ˋ;
    private int ˎ;
    public Bundle ˏ;

    private DataBuffer(Parcel parcel) {
        this.ˎ = 1;
        this.ˏ = null;
        this.ˊ = null;
        ˎ(parcel);
    }

    public DataBuffer() {
        this.ˎ = 1;
        this.ˏ = null;
        this.ˊ = null;
    }

    public DataBuffer(String str) {
        this.ˎ = 1;
        this.ˏ = null;
        this.ˊ = null;
        this.ˋ = str;
    }

    public DataBuffer(String str, int i) {
        this.ˎ = 1;
        this.ˏ = null;
        this.ˊ = null;
        this.ˋ = str;
        this.ˎ = i;
    }

    public DataBuffer ˎ(Bundle bundle) {
        this.ˊ = bundle;
        return this;
    }

    public Bundle ˊ() {
        return this.ˊ;
    }

    public int ˏ() {
        return this.ˊ == null ? 0 : 1;
    }

    private void ˎ(Parcel parcel) {
        this.ˎ = parcel.readInt();
        this.ˋ = parcel.readString();
        this.ˏ = parcel.readBundle(ˎ(getClass()));
        this.ˊ = parcel.readBundle(ˎ(getClass()));
    }

    public int describeContents() {
        return 0;
    }

    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(this.ˎ);
        parcel.writeString(this.ˋ);
        parcel.writeBundle(this.ˏ);
        parcel.writeBundle(this.ˊ);
    }

    public int ˋ() {
        return this.ˎ;
    }

    private static ClassLoader ˎ(Class cls) {
        return cls == null ? ClassLoader.getSystemClassLoader() : cls.getClassLoader();
    }
}
